/**
 * 表单验证工具
 */
export const validatePositiveNumber = (value) => {
  if (value === undefined || value === null || value === '') {
    return true
  }
  const num = parseFloat(value)
  return !isNaN(num) && num >= 0
}

export const validateRequired = (value) => {
  return value !== undefined && value !== null && value.toString().trim() !== ''
}    